;;; -*- Mode: Lisp; Package: Macsyma -*-
;;; Translated code for DSK:SHARE1;NTRIG 2
;;; Written on "Saturday, Dec 31, 1983  5:44pm", from MACSYMA 304
;;; Translated for JPG

;;; TRANSL-AUTOLOAD version by GJC0 on MONDAY, July 4, 1983, at 1:49:49
;;; TRHOOK version 5 TRMODE version 73 DCL version 5/29/82 8:19:42
;;; MCOMPI version NIL TRDATA version 68 ACALL version NIL
;;; FCALL version NIL TRANSQ version NIL MDEFUN version NIL
;;; MTAGS version NIL TRPRED version 6 TROPER version 15
;;; TRANSF version 11 TRANS5 version NIL TRANS4 version 29
;;; TRANS3 version NIL TRANS2 version NIL TRANS1 version NIL
;;; TRUTIL version 26 TRANSL version 1157 TRANSS version 80
(includef (cond ((status feature ITS) '|DSK:LIBMAX;TPRELU >|)
                ((status feature Multics) '|translate|)
                ((status feature Unix) '|libmax/tprelu.l|)
                (t (error '|Unknown system, see GJC@MIT-MC|))))

(eval-when (compile eval)
  (or (status feature lispm)
      (setq *infile-name-key*
               ((lambda (file-name)
                           ;; temp crock for multics.
                          (cond ((eq (typep file-name) 'list)
                                 (namestring file-name))
                                (t file-name)))
                  (truename infile)))))

(eval-when (compile)
   (setq $tr_semicompile 'NIL)
   (setq forms-to-compile-queue ()))

(comment |DSK:SHARE1;NTRIG 2|)

(DEF-MTRVAR $NUMER (QUOTE $NUMER) 1.)
(DEFMTRFUN-EXTERNAL ($USIN $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($UCOS $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($USIN1 $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($UCOS1 $ANY MDEFINE NIL NIL))
(DECLARE (SPECIAL $N))
(DEF-MTRVAR *AFTERFLAG (QUOTE *AFTERFLAG) 1.)

(DEFPROP $USIN T TRANSLATED)
(ADD2LNC (QUOTE $USIN) $PROPS)
(DEFMTRFUN ($USIN $ANY MDEFINE NIL NIL) ($N) NIL (MUL* (SIMPLIFY (LIST (QUOTE (%SIGNUM)) ((LAMBDA (|tr-gensym~0|) (UNWIND-PROTECT (PROGN (NUMERSET (QUOTE $NUMER) |tr-gensym~0|) ((LAMBDA ($NUMER) NIL (SIMPLIFY (LIST (QUOTE (%SIN)) (DIV (MUL* $N (QUOTE $%PI)) 10.)))) |tr-gensym~0|)) (NUMERSET (QUOTE $NUMER) (TRD-MSYMEVAL $NUMER (QUOTE $NUMER))))) T))) (SIMPLIFY (MFUNCTION-CALL $USIN1 $N))))

(DEFPROP $UCOS T TRANSLATED)
(ADD2LNC (QUOTE $UCOS) $PROPS)
(DEFMTRFUN ($UCOS $ANY MDEFINE NIL NIL) ($N) NIL (MUL* (SIMPLIFY (LIST (QUOTE (%SIGNUM)) ((LAMBDA (|tr-gensym~1|) (UNWIND-PROTECT (PROGN (NUMERSET (QUOTE $NUMER) |tr-gensym~1|) ((LAMBDA ($NUMER) NIL (SIMPLIFY (LIST (QUOTE (%COS)) (DIV (MUL* $N (QUOTE $%PI)) 10.)))) |tr-gensym~1|)) (NUMERSET (QUOTE $NUMER) (TRD-MSYMEVAL $NUMER (QUOTE $NUMER))))) T))) (SIMPLIFY (MFUNCTION-CALL $UCOS1 $N))))

(DEFPROP $USIN1 T TRANSLATED)
(ADD2LNC (QUOTE $USIN1) $PROPS)
(DEFMTRFUN ($USIN1 $ANY MDEFINE NIL NIL) ($N) NIL ((LAMBDA ($REM) NIL (COND ((OR (LIKE $REM 1.) (LIKE $REM 9.)) (DIV (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) -1.) 4.)) ((OR (LIKE $REM 2.) (LIKE $REM 8.)) (DIV (MUL* (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) -1.) (SIMPLIFY (LIST (QUOTE (%SQRT)) (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) 5.)))) (MUL* 4. (SIMPLIFY (LIST (QUOTE (%SQRT)) 2.))))) ((OR (LIKE $REM 3.) (LIKE $REM 7.)) (DIV (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) 1.) 4.)) ((OR (LIKE $REM 4.) (LIKE $REM 6.)) (DIV (SIMPLIFY (LIST (QUOTE (%SQRT)) (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) 5.))) (MUL* 2. (SIMPLIFY (LIST (QUOTE (%SQRT)) 2.))))))) (SIMPLIFY (LIST (QUOTE (MABS)) (SIMPLIFY ($REMAINDER $N 10.))))))

(DEFPROP $UCOS1 T TRANSLATED)
(ADD2LNC (QUOTE $UCOS1) $PROPS)
(DEFMTRFUN ($UCOS1 $ANY MDEFINE NIL NIL) ($N) NIL ((LAMBDA ($REM) NIL (COND ((OR (LIKE $REM 1.) (LIKE $REM 9.)) (DIV (SIMPLIFY (LIST (QUOTE (%SQRT)) (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) 5.))) (MUL* 2. (SIMPLIFY (LIST (QUOTE (%SQRT)) 2.))))) ((OR (LIKE $REM 2.) (LIKE $REM 8.)) (DIV (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) 1.) 4.)) ((OR (LIKE $REM 3.) (LIKE $REM 7.)) (DIV (MUL* (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) -1.) (SIMPLIFY (LIST (QUOTE (%SQRT)) (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) 5.)))) (MUL* 4. (SIMPLIFY (LIST (QUOTE (%SQRT)) 2.))))) ((OR (LIKE $REM 4.) (LIKE $REM 6.)) (DIV (ADD* (SIMPLIFY (LIST (QUOTE (%SQRT)) 5.)) -1.) 4.)))) (SIMPLIFY (LIST (QUOTE (MABS)) (SIMPLIFY ($REMAINDER $N 10.))))))

(MEVAL* (QUOTE (($MODEDECLARE) $N $ANY)))
(MEVAL* (QUOTE (($DECLARE) $N $SPECIAL)))
(DEF-MTRVAR $N (QUOTE $N))
(ADD2LNC (QUOTE $N) $PROPS)
(MDEFPROP $N ($INTEGERP) MATCHDECLARE)

(MDEFPROP $SINRULE1 %SIN RULEOF)
(ADD2LNC (QUOTE $SINRULE1) $RULES)
(MDEFPROP %SIN 2. RULENUM)
(DEFUN $SINRULE1 (X ANS A3) (SETQ X (SIMP-%SIN X ANS A3)) (COND ((TRD-MSYMEVAL *AFTERFLAG (QUOTE *AFTERFLAG)) X) (T (PROG (G0017 *AFTERFLAG) (SETQ *AFTERFLAG T) (COND ((OR (ATOM X) (NOT (EQ (CAAR X) (QUOTE %SIN)))) (RETURN X))) (SETQ G0017 (CDR X)) (SETQ ANS (*CATCH (QUOTE MATCH) (PROG ($N G0018) (SETQ G0018 (KAR G0017)) (SETQ G0018 (DIV G0018 (QUOTE ((RAT SIMP) 1. 10.)))) (SETQ G0018 (DIV G0018 (QUOTE $%PI))) (COND (($INTEGERP G0018) (SETQ $N G0018)) ((MATCHERR))) (COND ((NTHKDR G0017 1.) (MATCHERR))) (RETURN (SIMPLIFY (MFUNCTION-CALL $USIN (TRD-MSYMEVAL $N (QUOTE $N)))))))) (RETURN (OR ANS (EQTEST X X)))))))
(MDEFPROP $SINRULE1 ((MEQUAL) ((%SIN SIMP) ((MTIMES SIMP) ((RAT SIMP) 1. 10.) $%PI $N)) (($USIN SIMP) $N)) $RULE)
(MDEFPROP %SIN (SIMP-%SIN) OLDRULES)
(DEFPROP %SIN $SINRULE1 OPERATORS)
(MDEFPROP %SIN ($SINRULE1 SIMP-%SIN) OLDRULES)

(MDEFPROP $COSRULE1 %COS RULEOF)
(ADD2LNC (QUOTE $COSRULE1) $RULES)
(MDEFPROP %COS 2. RULENUM)
(DEFUN $COSRULE1 (X ANS A3) (SETQ X (SIMP-%COS X ANS A3)) (COND ((TRD-MSYMEVAL *AFTERFLAG (QUOTE *AFTERFLAG)) X) (T (PROG (G0019 *AFTERFLAG) (SETQ *AFTERFLAG T) (COND ((OR (ATOM X) (NOT (EQ (CAAR X) (QUOTE %COS)))) (RETURN X))) (SETQ G0019 (CDR X)) (SETQ ANS (*CATCH (QUOTE MATCH) (PROG ($N G0020) (SETQ G0020 (KAR G0019)) (SETQ G0020 (DIV G0020 (QUOTE ((RAT SIMP) 1. 10.)))) (SETQ G0020 (DIV G0020 (QUOTE $%PI))) (COND (($INTEGERP G0020) (SETQ $N G0020)) ((MATCHERR))) (COND ((NTHKDR G0019 1.) (MATCHERR))) (RETURN (SIMPLIFY (MFUNCTION-CALL $UCOS (TRD-MSYMEVAL $N (QUOTE $N)))))))) (RETURN (OR ANS (EQTEST X X)))))))
(MDEFPROP $COSRULE1 ((MEQUAL) ((%COS SIMP) ((MTIMES SIMP) ((RAT SIMP) 1. 10.) $%PI $N)) (($UCOS SIMP) $N)) $RULE)
(MDEFPROP %COS (SIMP-%COS) OLDRULES)
(DEFPROP %COS $COSRULE1 OPERATORS)
(MDEFPROP %COS ($COSRULE1 SIMP-%COS) OLDRULES)

(MDEFPROP $TANRULE1 %TAN RULEOF)
(ADD2LNC (QUOTE $TANRULE1) $RULES)
(MDEFPROP %TAN 2. RULENUM)
(DEFUN $TANRULE1 (X ANS A3) (SETQ X (SIMP-%TAN X ANS A3)) (COND ((TRD-MSYMEVAL *AFTERFLAG (QUOTE *AFTERFLAG)) X) (T (PROG (G0021 *AFTERFLAG) (SETQ *AFTERFLAG T) (COND ((OR (ATOM X) (NOT (EQ (CAAR X) (QUOTE %TAN)))) (RETURN X))) (SETQ G0021 (CDR X)) (SETQ ANS (*CATCH (QUOTE MATCH) (PROG ($N G0022) (SETQ G0022 (KAR G0021)) (SETQ G0022 (DIV G0022 (QUOTE ((RAT SIMP) 1. 10.)))) (SETQ G0022 (DIV G0022 (QUOTE $%PI))) (COND (($INTEGERP G0022) (SETQ $N G0022)) ((MATCHERR))) (COND ((NTHKDR G0021 1.) (MATCHERR))) (RETURN (MUL* (POWER (SIMPLIFY (MFUNCTION-CALL $UCOS (TRD-MSYMEVAL $N (QUOTE $N)))) -1.) (SIMPLIFY (MFUNCTION-CALL $USIN (TRD-MSYMEVAL $N (QUOTE $N))))))))) (RETURN (OR ANS (EQTEST X X)))))))
(MDEFPROP $TANRULE1 ((MEQUAL) ((%TAN SIMP) ((MTIMES SIMP) ((RAT SIMP) 1. 10.) $%PI $N)) ((MTIMES SIMP) ((MEXPT SIMP) (($UCOS SIMP) $N) -1.) (($USIN SIMP) $N))) $RULE)
(MDEFPROP %TAN (SIMP-%TAN) OLDRULES)
(DEFPROP %TAN $TANRULE1 OPERATORS)
(MDEFPROP %TAN ($TANRULE1 SIMP-%TAN) OLDRULES)

(MDEFPROP $COTRULE1 %COT RULEOF)
(ADD2LNC (QUOTE $COTRULE1) $RULES)
(MDEFPROP %COT 2. RULENUM)
(DEFUN $COTRULE1 (X ANS A3) (SETQ X (SIMP-%COT X ANS A3)) (COND ((TRD-MSYMEVAL *AFTERFLAG (QUOTE *AFTERFLAG)) X) (T (PROG (G0023 *AFTERFLAG) (SETQ *AFTERFLAG T) (COND ((OR (ATOM X) (NOT (EQ (CAAR X) (QUOTE %COT)))) (RETURN X))) (SETQ G0023 (CDR X)) (SETQ ANS (*CATCH (QUOTE MATCH) (PROG ($N G0024) (SETQ G0024 (KAR G0023)) (SETQ G0024 (DIV G0024 (QUOTE ((RAT SIMP) 1. 10.)))) (SETQ G0024 (DIV G0024 (QUOTE $%PI))) (COND (($INTEGERP G0024) (SETQ $N G0024)) ((MATCHERR))) (COND ((NTHKDR G0023 1.) (MATCHERR))) (RETURN (MUL* (SIMPLIFY (MFUNCTION-CALL $UCOS (TRD-MSYMEVAL $N (QUOTE $N)))) (POWER (SIMPLIFY (MFUNCTION-CALL $USIN (TRD-MSYMEVAL $N (QUOTE $N)))) -1.)))))) (RETURN (OR ANS (EQTEST X X)))))))
(MDEFPROP $COTRULE1 ((MEQUAL) ((%COT SIMP) ((MTIMES SIMP) ((RAT SIMP) 1. 10.) $%PI $N)) ((MTIMES SIMP) (($UCOS SIMP) $N) ((MEXPT SIMP) (($USIN SIMP) $N) -1.))) $RULE)
(MDEFPROP %COT (SIMP-%COT) OLDRULES)
(DEFPROP %COT $COTRULE1 OPERATORS)
(MDEFPROP %COT ($COTRULE1 SIMP-%COT) OLDRULES)

(MDEFPROP $SECRULE1 %SEC RULEOF)
(ADD2LNC (QUOTE $SECRULE1) $RULES)
(MDEFPROP %SEC 2. RULENUM)
(DEFUN $SECRULE1 (X ANS A3) (SETQ X (SIMP-%SEC X ANS A3)) (COND ((TRD-MSYMEVAL *AFTERFLAG (QUOTE *AFTERFLAG)) X) (T (PROG (G0025 *AFTERFLAG) (SETQ *AFTERFLAG T) (COND ((OR (ATOM X) (NOT (EQ (CAAR X) (QUOTE %SEC)))) (RETURN X))) (SETQ G0025 (CDR X)) (SETQ ANS (*CATCH (QUOTE MATCH) (PROG ($N G0026) (SETQ G0026 (KAR G0025)) (SETQ G0026 (DIV G0026 (QUOTE ((RAT SIMP) 1. 10.)))) (SETQ G0026 (DIV G0026 (QUOTE $%PI))) (COND (($INTEGERP G0026) (SETQ $N G0026)) ((MATCHERR))) (COND ((NTHKDR G0025 1.) (MATCHERR))) (RETURN (POWER (SIMPLIFY (MFUNCTION-CALL $UCOS (TRD-MSYMEVAL $N (QUOTE $N)))) -1.))))) (RETURN (OR ANS (EQTEST X X)))))))
(MDEFPROP $SECRULE1 ((MEQUAL) ((%SEC SIMP) ((MTIMES SIMP) ((RAT SIMP) 1. 10.) $%PI $N)) ((MEXPT SIMP) (($UCOS SIMP) $N) -1.)) $RULE)
(MDEFPROP %SEC (SIMP-%SEC) OLDRULES)
(DEFPROP %SEC $SECRULE1 OPERATORS)
(MDEFPROP %SEC ($SECRULE1 SIMP-%SEC) OLDRULES)

(MDEFPROP $CSCRULE1 %CSC RULEOF)
(ADD2LNC (QUOTE $CSCRULE1) $RULES)
(MDEFPROP %CSC 2. RULENUM)
(DEFUN $CSCRULE1 (X ANS A3) (SETQ X (SIMP-%CSC X ANS A3)) (COND ((TRD-MSYMEVAL *AFTERFLAG (QUOTE *AFTERFLAG)) X) (T (PROG (G0027 *AFTERFLAG) (SETQ *AFTERFLAG T) (COND ((OR (ATOM X) (NOT (EQ (CAAR X) (QUOTE %CSC)))) (RETURN X))) (SETQ G0027 (CDR X)) (SETQ ANS (*CATCH (QUOTE MATCH) (PROG ($N G0028) (SETQ G0028 (KAR G0027)) (SETQ G0028 (DIV G0028 (QUOTE ((RAT SIMP) 1. 10.)))) (SETQ G0028 (DIV G0028 (QUOTE $%PI))) (COND (($INTEGERP G0028) (SETQ $N G0028)) ((MATCHERR))) (COND ((NTHKDR G0027 1.) (MATCHERR))) (RETURN (POWER (SIMPLIFY (MFUNCTION-CALL $USIN (TRD-MSYMEVAL $N (QUOTE $N)))) -1.))))) (RETURN (OR ANS (EQTEST X X)))))))
(MDEFPROP $CSCRULE1 ((MEQUAL) ((%CSC SIMP) ((MTIMES SIMP) ((RAT SIMP) 1. 10.) $%PI $N)) ((MEXPT SIMP) (($USIN SIMP) $N) -1.)) $RULE)
(MDEFPROP %CSC (SIMP-%CSC) OLDRULES)
(DEFPROP %CSC $CSCRULE1 OPERATORS)
(MDEFPROP %CSC ($CSCRULE1 SIMP-%CSC) OLDRULES)


(compile-forms-to-compile-queue)

